package services.impl;

import dao.TopicMapper;
import entity.Topic;
import org.apache.ibatis.session.SqlSession;
import services.ITopicService;
import utils.SqlSessionFactoryUtils;

import java.util.List;

public class TopicService implements ITopicService {
    SqlSession session= SqlSessionFactoryUtils.getSqlSession();
    TopicMapper topicMapper=session.getMapper(TopicMapper.class);
    @Override
    public List<Topic> getAllTopic() {
        return topicMapper.getAllTopic();
    }
}
